package com.guaoran.consul.services.consumer;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * @author : 孤傲然
 * @description : consumer
 * @date :2019/11/22 15:16
 */
@SpringBootApplication
@EnableDiscoveryClient
public class ConsulServicesConsumerApplication {
    public static void main(String[] args) {
        SpringApplication.run(ConsulServicesConsumerApplication.class,args);
    }


    @Bean
    @LoadBalanced
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

}
